# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Transcoder.V1.Model.Audio do
  @moduledoc """
  Audio preprocessing configuration.

  ## Attributes

  *   `highBoost` (*type:* `boolean()`, *default:* `nil`) - Enable boosting high frequency components. The default is `false`. **Note:** This field is not supported.
  *   `lowBoost` (*type:* `boolean()`, *default:* `nil`) - Enable boosting low frequency components. The default is `false`. **Note:** This field is not supported.
  *   `lufs` (*type:* `float()`, *default:* `nil`) - Specify audio loudness normalization in loudness units relative to full scale (LUFS). Enter a value between -24 and 0 (the default), where: * -24 is the Advanced Television Systems Committee (ATSC A/85) standard * -23 is the EU R128 broadcast standard * -19 is the prior standard for online mono audio * -18 is the ReplayGain standard * -16 is the prior standard for stereo audio * -14 is the new online audio standard recommended by Spotify, as well as Amazon Echo * 0 disables normalization
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :highBoost => boolean() | nil,
          :lowBoost => boolean() | nil,
          :lufs => float() | nil
        }

  field(:highBoost)
  field(:lowBoost)
  field(:lufs)
end

defimpl Poison.Decoder, for: GoogleApi.Transcoder.V1.Model.Audio do
  def decode(value, options) do
    GoogleApi.Transcoder.V1.Model.Audio.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Transcoder.V1.Model.Audio do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
